/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: javase2203 - T9
 * <p>Powered by webrx On 2022-08-09 11:41:57
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class T9 {

    static void work(){
        String t = Thread.currentThread().getName();
        for (int i = 0; i < 50; i++) {
            System.out.printf("%s:%02d%n",t,i);
            if(i == 30){
                Thread.yield();
            }
        }
    }
    public static void main(String[] args) {
        new Thread(T9::work,"T1").start();
        new Thread(T9::work,"T2").start();
    }
}
